/**
 * 
 */
package com.bolbachchan.blog.hibernate.domain;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Chaitanya
 * 
 */
public class UserDetails implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -4143864680846437369L;

    private Integer objId;
    private String username;
    private String password;
    private String firstName;
    private String lastName;
    private String addressLine1;
    private String addressLine2;
    private String city;
    private String state;
    private String country;
    private String phone;
    private Timestamp dateRegistered;
    private Timestamp lastLogin;

    private Set<SecurityAnswers> securityAnswers = new HashSet<SecurityAnswers>();
    private Set<Posts> posts = new HashSet<Posts>();
    private Set<Comments> comments = new HashSet<Comments>();

    public UserDetails() {

    }

    public UserDetails(int userObjId) {
	setObjId(userObjId);
    }

    /**
     * @return the objId
     */
    public Integer getObjId() {
	return objId;
    }

    /**
     * @param objId
     *            the objId to set
     */
    public void setObjId(Integer objId) {
	this.objId = objId;
    }

    /**
     * @return the username
     */
    public String getUsername() {
	return username;
    }

    /**
     * @param username
     *            the username to set
     */
    public void setUsername(String username) {
	this.username = username;
    }

    /**
     * @return the password
     */
    public String getPassword() {
	return password;
    }

    /**
     * @param password
     *            the password to set
     */
    public void setPassword(String password) {
	this.password = password;
    }

    /**
     * @return the firstName
     */
    public String getFirstName() {
	return firstName;
    }

    /**
     * @param firstName
     *            the firstName to set
     */
    public void setFirstName(String firstName) {
	this.firstName = firstName;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
	return lastName;
    }

    /**
     * @param lastName
     *            the lastName to set
     */
    public void setLastName(String lastName) {
	this.lastName = lastName;
    }

    /**
     * @return the addressLine1
     */
    public String getAddressLine1() {
	return addressLine1;
    }

    /**
     * @param addressLine1
     *            the addressLine1 to set
     */
    public void setAddressLine1(String addressLine1) {
	this.addressLine1 = addressLine1;
    }

    /**
     * @return the addressLine2
     */
    public String getAddressLine2() {
	return addressLine2;
    }

    /**
     * @param addressLine2
     *            the addressLine2 to set
     */
    public void setAddressLine2(String addressLine2) {
	this.addressLine2 = addressLine2;
    }

    /**
     * @return the city
     */
    public String getCity() {
	return city;
    }

    /**
     * @param city
     *            the city to set
     */
    public void setCity(String city) {
	this.city = city;
    }

    /**
     * @return the state
     */
    public String getState() {
	return state;
    }

    /**
     * @param state
     *            the state to set
     */
    public void setState(String state) {
	this.state = state;
    }

    /**
     * @return the country
     */
    public String getCountry() {
	return country;
    }

    /**
     * @param country
     *            the country to set
     */
    public void setCountry(String country) {
	this.country = country;
    }

    /**
     * @return the phone
     */
    public String getPhone() {
	return phone;
    }

    /**
     * @param phone
     *            the phone to set
     */
    public void setPhone(String phone) {
	this.phone = phone;
    }

    /**
     * @return the dateRegistered
     */
    public Timestamp getDateRegistered() {
	return dateRegistered;
    }

    /**
     * @param dateRegistered
     *            the dateRegistered to set
     */
    public void setDateRegistered(Timestamp dateRegistered) {
	this.dateRegistered = dateRegistered;
    }

    /**
     * @return the lastLogin
     */
    public Timestamp getLastLogin() {
	return lastLogin;
    }

    /**
     * @param lastLogin
     *            the lastLogin to set
     */
    public void setLastLogin(Timestamp lastLogin) {
	this.lastLogin = lastLogin;
    }

    /**
     * @return the securityAnswers
     */
    public Set<SecurityAnswers> getSecurityAnswers() {
	return securityAnswers;
    }

    /**
     * @param securityAnswers
     *            the securityAnswers to set
     */
    public void setSecurityAnswers(Set<SecurityAnswers> securityAnswers) {
	this.securityAnswers = securityAnswers;
    }

    /**
     * @return the posts
     */
    public Set<Posts> getPosts() {
	return posts;
    }

    /**
     * @param posts
     *            the posts to set
     */
    public void setPosts(Set<Posts> posts) {
	this.posts = posts;
    }

    /**
     * @return the comments
     */
    public Set<Comments> getComments() {
	return comments;
    }

    /**
     * @param comments
     *            the comments to set
     */
    public void setComments(Set<Comments> comments) {
	this.comments = comments;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("UserDetails [objId=");
	builder.append(objId);
	builder.append(", username=");
	builder.append(username);
	builder.append(", password=");
	builder.append(password);
	builder.append(", firstName=");
	builder.append(firstName);
	builder.append(", lastName=");
	builder.append(lastName);
	builder.append(", addressLine1=");
	builder.append(addressLine1);
	builder.append(", addressLine2=");
	builder.append(addressLine2);
	builder.append(", city=");
	builder.append(city);
	builder.append(", state=");
	builder.append(state);
	builder.append(", country=");
	builder.append(country);
	builder.append(", phone=");
	builder.append(phone);
	builder.append(", dateRegistered=");
	builder.append(dateRegistered);
	builder.append(", lastLogin=");
	builder.append(lastLogin);
	builder.append("]");
	return builder.toString();
    }
}
